package com.whu.pojo;

import java.text.SimpleDateFormat;
import java.sql.Date;

public class Car {

	/*
	 * car01 车辆id 
	 * car02 汽车名称
	 * car03 汽车型号
	 * car04 汽车厂商
	 * car05 级别
	 * car06 价格
	 * car07 能源
	 * car08 上市时间
	 * car09 口碑1
	 * car10 口碑2
	 * car11 口碑3
	 * car12 口碑4
	 * car13 口碑5
	 */
	private int car01;
	private String car02;
	private String car03;
	private String car04;
	private String car05;
	private int car06;
	private String car07;
	private Date car08;
	private int car09;
	private int car10;
	private int car11;
	private int car12;
	private int car13;
	
	public int getCar01() {
		return car01;
	}
	public void setCar01(int car01) {
		this.car01 = car01;
	}
	public String getCar02() {
		return car02;
	}
	public void setCar02(String car02) {
		this.car02 = car02;
	}
	public String getCar03() {
		return car03;
	}
	public void setCar03(String car03) {
		this.car03 = car03;
	}
	public String getCar04() {
		return car04;
	}
	public void setCar04(String car04) {
		this.car04 = car04;
	}
	public String getCar05() {
		return car05;
	}
	public void setCar05(String car05) {
		this.car05 = car05;
	}
	public int getCar06() {
		return car06;
	}
	public void setCar06(int car06) {
		this.car06 = car06;
	}
	public String getCar07() {
		return car07;
	}
	public void setCar07(String car07) {
		this.car07 = car07;
	}
	public Date getCar08() {
		return car08;
	}
	public void setCar08(String car08) {
		SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
		
		try {
			if(car08!=""&&car08!= null) 
			{
				System.out.println(car08);
				Date birthday =new java.sql.Date(sdf.parse(car08).getTime());
			this.car08 = birthday;
			}
			else
			{
				Date birthday =new java.sql.Date(sdf.parse("2000-01-01").getTime());
				this.car08 = birthday;
			}
		} catch (Exception e) {
			e.printStackTrace();
		}
	}
	public int getCar09() {
		return car09;
	}
	public void setCar09(int car09) {
		this.car09 = car09;
	}
	public int getCar10() {
		return car10;
	}
	public void setCar10(int car10) {
		this.car10 = car10;
	}
	public int getCar11() {
		return car11;
	}
	public void setCar11(int car11) {
		this.car11 = car11;
	}
	public int getCar12() {
		return car12;
	}
	public void setCar12(int car12) {
		this.car12 = car12;
	}
	public int getCar13() {
		return car13;
	}
	public void setCar13(int car13) {
		this.car13 = car13;
	}
	@Override
	public String toString() {
		return this.getCar01()+
		this.getCar02()+
		this.getCar03()+
		this.getCar04()+
		this.getCar05()+
		this.getCar06()+
		this.getCar07()+
		this.getCar08()+
		this.getCar09()+
		this.getCar10()+
		this.getCar11()+
		this.getCar12()+
		this.getCar13();
	}
	
}
